package com.ttc.mBackup;

import com.ttc.mBackup.BackupContacts.RestoreContactActivity;
import com.ttc.mBackup.BackupImages.RestoreImageActivity;
import com.ttc.mBackup.BackupSMS.RestoreSMSActivity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;

import android.widget.ImageButton;

public class RestoreActivity extends Activity {

	private ImageButton btnContacts;
	private ImageButton btnSMS;
	private ImageButton btnImages;
	private ImageButton btnAgent;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.layout_restore);
		btnContacts = (ImageButton) findViewById(R.id.restore_btnContacts);
		btnSMS = (ImageButton) findViewById(R.id.restore_btnSMS);
		btnImages = (ImageButton) findViewById(R.id.restore_btnImages);
		btnAgent = (ImageButton) findViewById(R.id.restore_btnAgent);

		btnContacts.setOnClickListener(oclContacts);
		btnSMS.setOnClickListener(oclSMS);
		btnImages.setOnClickListener(oclImages);
		btnAgent.setOnClickListener(oclAgent);
		
	}

	OnClickListener oclContacts = new OnClickListener() {

		@Override
		public void onClick(View v) {
			Intent intent = new Intent(RestoreActivity.this, RestoreContactActivity.class);
			startActivity(intent);

		}
	};

	OnClickListener oclSMS = new OnClickListener() {

		@Override
		public void onClick(View v) {
			Intent intent = new Intent(RestoreActivity.this, RestoreSMSActivity.class);
			startActivity(intent);
		}
	};

	OnClickListener oclImages = new OnClickListener() {

		@Override
		public void onClick(View v) {
			Intent intent = new Intent(RestoreActivity.this, RestoreImageActivity.class);
			startActivity(intent);

		}
	};

	OnClickListener oclAgent = new OnClickListener() {

		@Override
		public void onClick(View v) {
			// Start your task
			Intent i = new Intent("com.ttc.mBackup.BackupAgent.BACKUPRESTORE");
			i.putExtra(BackupActivity.KEY_ACTIVITY,false);
			startActivity(i);	
		}
	};

}
